home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Aminet 2
/
Aminet AMIGA CDROM (1994)(Walnut Creek)[Feb 1994][W.O. 44790-1].iso
/
Aminet
/
os30
/
wb
/
ProcurePens.lha
/
ProcurePens.DOC
< prev
next >
Wrap
Text File
|
1993-10-16
|
6KB
|
155 lines
PROCUREPENS and SETPENS
~~~~~~~~~~~~~~~~~~~~~~~
Color setting software for AGA and Workbench release 3.0 (V39) or higher.
Copyright ©1993 by Joseph Luk. All rights reserved.
----------------------------------------------------------- MAIN DOCUMENTATION
Introduction
~~~~~~~~~~~~
With the release of the AGA systems, Commodore included a wonderful new
version of the operating system which took advantage of the new chips'
extended color selection. Workbench 3.0 is able to open the screen in
any number of colors from 2 to 256, but it only allows eight of them
to be defined for its use (for icons, etc). Workbench 2.0 to 2.1 allowed
you to define sixteen. Go figure.
Anyway, the only thing really preventing you from using more than eight
colors is the fact that the Palette Preferences only defines that number.
The rest are left over for other programs to use in Workbench 3.0's palette
sharing scheme. This is where ProcurePens and the related SetPens comes in.
What ProcurePens does
~~~~~~~~~~~~~~~~~~~~~
ProcurePens uses the V39 graphics.library function ObtainPen() to lock, or
procure, a pen. The idea here is that you call this program from your
user-startup, so that it gets run every time you boot. This way, you can
have a standard setup for colors beyond the eight that Palette Preferences
allows. You can lock all available pens for exclusive use, if you wanted to.
With the pens locked and set on startup, you can use those extra colors
in Workbench icons (though you may have to use IconEdit 2.x to get them
to work in 16 colors), Dock icons, console escape colors (multicolor CLI
prompts), and other cool stuff.
What SetPens does
~~~~~~~~~~~~~~~~~
SetPens is a somewhat stripped-down version of ProcurePens which does not
lock pens. Instead, it uses SetRGB32() which simply sets the pen colors.
It reads the same config file as ProcurePens, but, as stated above, merely
sets the colors and does not lock them in any way. It also doesn't observe
locking rules when it sets the pens; it can redefine colors that are in
use by some other program, so use cautiously.
Quick Start
~~~~~~~~~~~
Okay, enough talk for now. Open your Workbench in 16 or more colors, pop
a CLI, go to the directory which you extracted this archive in, and type:
ProcurePens SampleConfig
If pens 4, 5, 6, or 7 are available (not locked by another program),
ProcurePens should tell you that it has set all the pens to the colors
specified in the config file. Hit [CTRL-C] to remove the program and
its locks.
Usage
~~~~~
Typing ProcurePens ? will give you its template:
CONFIGFILE/A,HEX/S,EXCLUSIVE/S,PUBSCREEN/K,LOCKSCREEN/S,VERBOSE/S,DEBUG/S:
Items are as follows:
CONFIGFILE - filename of the required configuration file. The format is
as follows:
Header Line: "ProcurePens Config File"
Line 1: pen number to lock
Line 2: 8-bit red value (defaults to decimal)
Line 3: 8-bit green value
Line 4: 8-bit blue value
Line 5: delimeter (---)
Lines 1-5 define a specifier that ProcurePens will use to lock and
set the pen. These repeat until you place "END" as the final
delimeter. (see the SampleConfig for an example)
HEX/S - Specify this keyword to indicate that the 8-bit color values
in the config file are hexadecimal numbers.
EXCLUSIVE/S - Specify this to lock the pens in "exclusive" mode. Not really
useful, since all this means is that another program requesting the
same or a close color won't be able to use the pen.
PUBSCREEN/K - Name of the public screen to perform the operation on.
Defaults to "Workbench".
Example: PUBSCREEN=SomebodysScreen1
LOCKSCREEN/S - ProcurePens performs a LockPubScreen() to get the address
of the screen, so that it can do its stuff. By default, it will unlock
the screen (allowing you to change screenmodes, etc) when it is done and
re-lock the screen when it needs to be removed. Specify this switch
to prevent this from happening.
VERBOSE/S - some extra info
DEBUG/S - some more extra info. :>
More often than not, you will want to call ProcurePens from your user-startup.
In this case, simply launch the program as a seperate task:
run >NIL: ProcurePens <config-file> <options>
Note that all console output from the program is supressed in this form,
so errors won't be reported. Best advice is to try it out before dropping
it in your user-startup.
To remove it (normally you'd leave ProcurePens alone since removing it can
subject your onscreen colors to change), simply find its process number
(use Status), and Break it.
Example: Break 3
(if ProcurePens is process 3)
--
SetPens works similarly, except it doesn't stay resident because it doesn't
retain locks on the colors. As such, you won't need the LOCKSCREEN switch.
Furthermore, it doesn't lock pens, so there's no EXCLUSIVE switch either.
It was also written later, so DEBUG and VERBOSE have been pruned too. :>
Note that SetPens uses the same config file as ProcurePens, and this
file must begin with "ProcurePens Config File".
Et Al
~~~~~
I hope you find these programs useful. They're all set to localize, so if
anyone wants to see them use locale.library, I'd be happy to do it. Bug
reports, suggestions, fan mail, secrets of the Universe, etc should be
sent to:
Joseph Luk
Internet: jluk@eis.calstate.edu
GEnie: J.LUK
S-mail: San Francisco, CA 94188-4401 U.S.A. (no address is necessary)
BTW, in case you're wondering, this is my gift to you. If you use these
programs regularly, I'd *LOVE* to get a postcard from you though! :>
--